﻿using System;
using SAKS.Models;
using SAKS.ViewModels;
using System.Collections.Generic;

namespace SAKS.IServices
{
    public interface IProjectServices : IHasSession
    {
        bool IsUserAdminOfProject(string username,Guid projectId);
        bool IsUserInProject(string UserName, Guid projectid);

        string GetAdminName(Guid projectId);

        Project GetProjectById(Guid projectid);
        void UpdateProjectInfo(ProjectCreateUpdateModel model);
        List<User> GetMembers(Guid projectId);
        void AddMember(string userName, Guid projectId);
        void RemoveMember(string userName, Guid projectId);

        void ReAppointAdmin(string userName, Guid ProjectId);

        string GetProjectNameById(Guid projectId);



        CreateStatus Create(Project projectinfo, string adminName);

        object[] List(int first, int pageSize, out int? totalRecords,string sSerachByName);
        object[] GetProjectJoinRequets(Guid id);
        void AddJoinRequest(Guid id, ProjectJoinRequest request);
        void RemoveJoinRequest(Guid id);

        IEnumerable<ProjectProcess> GetProcess(Guid projectId);
        void AddProcess(Guid projectId,ProjectProcess process);
        void RemoveProcess(Guid projectId, Guid processId);
        ProjectProcess GetNewestProcess(Guid projectId);

        void ApproveProcess(Guid ProjectId, Guid ProcessId);
    }
}
